package org.example;

import javax.swing.*;
import java.awt.*;

public class UpPanel extends JPanel {

    private JTextField inputTxt;

    public UpPanel() {
        this.setBackground(Color.WHITE);

        this.inputTxt = new JTextField();
        this.inputTxt.setColumns(12);
        this.add(this.inputTxt);

        //添加边框
//        this.setBorder(BorderFactory.createTitledBorder("Your Guess"));
        this.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.GREEN, 3), "Your Guess"));
    }

    public JTextField getInputTxt() {
        return inputTxt;
    }

    public void setInputTxt(JTextField inputTxt) {
        this.inputTxt = inputTxt;
    }
}
